﻿using System;
using System.IO;
using System.Reflection;
namespace SB.Database
{
    public interface IDatabase
    {
        void BeginTransaction();
        void CloseConnection();
        void CommitTransaction();
        NHibernate.ICriteria CreateCriteria(Type type);
        NHibernate.ICriteria CreateFindMatchingCriteria<T>(T entity, DatabaseFacade.MatchMode matchMode);
        System.Collections.Generic.IList<T> Find<T>(string hql);
        System.Collections.Generic.IList<T> FindMatching<T>(T entity, DatabaseFacade.MatchMode matchMode);
        void Flush();
        void RefreshObject(object obj);
        T Get<T>(object id);
        System.Collections.Generic.IList<T> GetAll<T>();
        NHibernate.IQuery GetNamedQuery(string queryName);
        void OpenConnection();
        void RollbackTransaction();
        void Save(object obj);
        void SaveArray(System.Collections.Generic.IEnumerable<object> array);
        void Delete(object obj);
        void EmptyTables();
        void CreateTables();
    }
}
